package com.ocom.payconfig.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ocom.common.entity.card.EntityKitchenPrtRecord;
import com.ocom.common.entity.card.EntityKitchenPrtScheme;
import com.ocom.common.enums.DataSourceEnum;
import com.ocom.common.enums.MasterSlaveEnum;
import com.ocom.mysql.aspect.DataSourceAspect;
import com.ocom.payconfig.dao.IDaoKitchenPrtRecord;
import com.ocom.payconfig.service.KitchenPrtRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
public class KitchenPrtRecordServiceImpl extends ServiceImpl<IDaoKitchenPrtRecord, EntityKitchenPrtRecord> implements KitchenPrtRecordService {

    @Autowired
    private IDaoKitchenPrtRecord iDaoKitchenPrtRecord;


    @Override
    @DataSourceAspect(type = DataSourceEnum.PART_DB,companyId = "comId",isMaster = MasterSlaveEnum.MASTER)
    public boolean saveRecord(Long comId, EntityKitchenPrtRecord entity) {
        return this.saveOrUpdate(entity);
    }
}
